<%
/**
 *
 * Inserts a link to the specified template's page.
 * Useful when describing a template and wanting to link to its
 * code for reference.
 *
 * Note that GitHub URLs are case-sensitve.
 * e.g. If the file is named "page.ejs", {{TemplateLink("Page")}} leads to 404
 * but {{TemplateLink("page")}} works
 *
 * Parameters:
 *
 * $0 - Name of the template to link to.
 */

let dest = "https://github.com/mdn/yari/tree/main/kumascript/macros/" + $0 + ".ejs";
let text = $0;
%>
<code class="templateLink"><a href="<%-dest%>"><%=text%></a></code>
